﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace Agresso.Interface.Layer.Domain
{
    public class apoheader
    {
        public string ext_ord_ref;
        public string client;
        public long order_id;
        public DateTime order_date = new DateTime(1900, 1, 1);

        public apoheader(SqlDataReader rd)
        {
            order_id = rd["order_id"] is DBNull ? 0 : Convert.ToInt64(rd["order_id"]);
            ext_ord_ref = rd["ext_ord_ref"] is DBNull ? "" : rd["ext_ord_ref"].ToString();
            client = rd["client"] is DBNull ? "" : rd["client"].ToString();
            order_date = rd["order_date"] is DBNull ? order_date : Convert.ToDateTime(rd["order_date"]);
        }
    }
}
